/*     */ package com.qmsk.business.manage.user.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class UserDAO extends SupportDAO
/*     */ {
/*  13 */   public static final String[] HEADS_ENCRY = { "password", "mp", 
/*  14 */     "IDNumber", "Tel" };
/*     */ 
/*     */   public GsonEbRst getGsonOfShopId(Integer shopId, Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  29 */     Object[] params = { shopId };
/*  30 */     return getGsonOfParams("select_cust_of_shopId", params, nPageIdx, 
/*  31 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfUserId(String userId) throws SQLException {
/*  35 */     Object[] params = { userId };
/*  36 */     return getGsonOfParams("select_of_deptId", "select_of_deptId_json", params);
/*     */   }
/*     */ 
/*     */   public boolean isExistsOfUserIdPassword(Integer id, String sPassword) throws SQLException
/*     */   {
/*  41 */     Object[] params = { id, sPassword };
/*  42 */     return (queryForInt("exitUserIdPs", params, Integer.valueOf(0)).intValue() > 0);
/*     */   }
/*     */ 
/*     */   public int changePs(Integer id, String newPs, String oldPs) throws Exception
/*     */   {
/*  47 */     Object[] params = { newPs, oldPs, id, oldPs };
/*  48 */     return update("updatePs", params);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getUserIdStatusOfLoginName(String loginUser, String sPassword) throws SQLException
/*     */   {
/*  53 */     Object[] params = { loginUser, sPassword };
/*  54 */     return getOneRowOfParams("getUserIdStatusOfLoginName", params);
/*     */   }
/*     */ 
/*     */   public int insertUserLogin(String sUserName, String sSessionId)
/*     */   {
/*  63 */     int nn = 1;
/*  64 */     return nn;
/*     */   }
/*     */ 
/*     */   public Integer getIsLoginName(String valueOfName)
/*     */     throws SQLException
/*     */   {
/*  79 */     Object[] params = { valueOfName };
/*  80 */     return queryForInt("selectSqlIsLogin", params, Integer.valueOf(0));
/*     */   }
/*     */ 
/*     */   public Integer getIsId(Long lMaxCustId) throws SQLException {
/*  84 */     Object[] params = { lMaxCustId };
/*  85 */     return queryForInt("selectSqlIsID", params, Integer.valueOf(0));
/*     */   }
/*     */ 
/*     */   public Long getUserIdOfEmail(String email) throws SQLException {
/*  89 */     Object[] params = { email };
/*  90 */     return queryForLong("getUserIdOfEmail", params, Long.valueOf(0L));
/*     */   }
/*     */ 
/*     */   public boolean existUserOfMp(String mp) throws SQLException {
/*  94 */     Object[] params = { mp };
/*  95 */     return queryForBoolean("existsUserOfMp", params, Boolean.valueOf(false)).booleanValue();
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getUserOfUserId(Long id) throws SQLException {
/*  99 */     Object[] params = { id };
/* 100 */     return getOneRowOfParams("getSqlOfId", params);
/*     */   }
/*     */ 
/*     */   public String getDutyNameOfUserId(Long id) throws SQLException {
/* 104 */     Object[] params = { id };
/* 105 */     return queryForString("getdutyNameOfId", params, "");
/*     */   }
/*     */ 
/*     */   public int updateOutIdOfId(Long outId, Long id) throws SQLException {
/* 109 */     Object[] params = { outId, id };
/* 110 */     return update("updateOutIdOfOfId", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfHostList(Integer nPageIdx, Short nPageSize)
/*     */   {
/* 115 */     return null;
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfHost(Long shopId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 120 */     Object[] params = { shopId };
/* 121 */     return getGsonOfParams("select_cust_of_host", params, nPageIdx, 
/* 122 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getUserList(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 127 */     return getGsonOfParams("select_cust_list", params, 
/* 128 */       nPageIdx, nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getUserListByDutyID(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 133 */     return getGsonOfParams("select_cust_list_dutyId", params, 
/* 134 */       nPageIdx, nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow selectUserById(Long id) throws SQLException {
/* 138 */     Object[] params = { id };
/* 139 */     return getOneRowOfParams("selectUserById", params);
/*     */   }
/*     */ 
/*     */   public int updateUserOpenId(String openID, Long userId) throws SQLException
/*     */   {
/* 144 */     Map params = new HashMap();
/* 145 */     params.put("openId", openID);
/* 146 */     params.put("custId", userId);
/* 147 */     return update("updateUserOpenId", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getUserListByDutyID(Map<String, Object> params) throws SQLException {
/* 151 */     return getGsonOfParams("select_cust_list_dutyId", params, 
/* 152 */       false);
/*     */   }
/*     */ 
/*     */   public GsonEbRst findUserByOpenId(String openId) throws SQLException {
/* 156 */     Map params = new HashMap();
/* 157 */     params.put("openId", openId);
/* 158 */     return getGsonOfParams("selectUserIdByOpenId", params, 
/* 159 */       false);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.manage.user.dao.UserDAO
 * JD-Core Version:    0.5.3
 */